<?php
    class User_model extends CI_Model {
        public function __construct()
        {
            parent::__construct();
            $this->load->database();
        }
        public function user_insert($arr){
            $this->db->insert('user',$arr);
        }
        public function user_update($id,$arr)
        {
            $this->db->where('id',$id);
            $this->db->update('user',$arr);
        }
        public function user_delete($id)
        {
            $this->db->where('id',$id);
            $this->db->delete('user');
        }
        public function user_select($id)
        {
            $this->db->where('id',$id);
            $this->db->select('*');
            $query = $this->db->get('user');
            return $query->result_array();
        }
    }
?>